
// 解决 sb平台 跳页的时候appcode没有改变的问题

export default (appCode) => {
    if(window.top.location.hash) {
        let hash = window.top.location.hash.substring(1);
    
        let param = {};
        let list = hash.split('&');
    
        list.map((item) => {
            let one = item.split('=');
    
            param[one[0]] = one[1];
        });
    
        param['c'] = appCode;
    
        let newHash = [];
    
        Object.keys(param).forEach((item) => {
            newHash.push(`${item}=${param[item]}`);
        });
        window.top.location.hash = newHash.join('&');
    }
}
